package org.demo.tomcat;
/**
 * 
 * @author  
 * @date    2010-12-12
 * @file    org.demo.tomcat.Stock.java
 */
public class Stock{
    private double yesterday;
    private double today;
    private double now;
    private String name;
    private String id;
    
    public Stock(double yesterday, double today, String name, String id){
        this.yesterday = yesterday;
        this.today = today;
        this.name = name;
        this.id = id;
        this.now = today;
    }

	/**
	 * @return the yesterday
	 */
	public double getYesterday() {
		return yesterday;
	}

	/**
	 * @return the today
	 */
	public double getToday() {
		return today;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param yesterday the yesterday to set
	 */
	public void setYesterday(double yesterday) {
		this.yesterday = yesterday;
	}

	/**
	 * @param today the today to set
	 */
	public void setToday(double today) {
		this.today = today;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the now
	 */
	public double getNow() {
		return now;
	}

	/**
	 * @param now the now to set
	 */
	public void setNow(double now) {
		this.now = now;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(name);
		sb.append(": ");
		sb.append(now);
		return sb.toString();
	}
}
